<?php
namespace app\admin\controller;

use think\Controller;
use think\Session;
use think\Db;

class Detail extends Controller
{
    public function _initialize()
    {
        if(!Session::has('Adminname')){
            $this->error('请登录!','../admin');
        }
        if(Session::get('Adminpower')!=1){
            $this->error('您没有访问权限!');
        }
    }
	//查看投递详情
    public function visit()
    {
        $id =  request()->get('id');
        $map['jobid'] = $id;
        $list = Db::name('jobjoin')->where($map)->cache(true,10)->select();
        $page = $list->render();
        $this->assign('list', $list);
        $this->assign('page', $page);
        return $this->fetch('resumelist');
    }

    //查看投递人详细信息
    public function person()
    {
        $id = request()->get('id');
        $map['id'] = $id;
        $list = Db::name('resume')->where($map)->select();
        $data = explode('/n/',$list[0]['filenames']);
        array_pop($data);
        $this->assign('list', $list);
        $this->assign('data', $data);
        return $this->fetch('resume');
    }
}